Skip to content

Conversation

@WeylonSantana
Copy link
Contributor

@WeylonSantana WeylonSantana commented Mar 12, 2025

assets AscensionGameDev/Intersect-Assets#67

1741800212_Intersect_Client.mp4

private readonly Label _cooldownLabel;
private readonly SpellsWindow _spellWindow;
private Draggable? _dragIcon;
private SpellDescriptionWindow? _descWindow;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_descriptionWindow

// Controls
private readonly Label _cooldownLabel;
private readonly SpellsWindow _spellWindow;
private Draggable? _dragIcon;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to be with other drag related properties

public ImagePanel Container;

// Drag Handling
public bool IsDragging;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be below the constructor and should be { get; private set; } not a field

Comment on lines +33 to +34
private int _mouseX = -1;
private int _mouseY = -1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be one Point _mousePosition

Comment on lines +268 to +269
_mouseX = InputHandler.MousePosition.X - _iconImage.ToCanvas(new Point(0, 0)).X;
_mouseY = InputHandler.MousePosition.Y - _iconImage.ToCanvas(new Point(0, 0)).Y;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calling ToCanvas() twice instead of caching the value is atrocious and should be fixed


public FloatRect RenderBounds()
{
var rect = new FloatRect()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use FloatRect rect = new()

}

private void Pnl_DoubleClicked(Base sender, MouseButtonState arguments)
void _iconImage_HoverLeave(Base sender, EventArgs arguments)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private void

}

void pnl_Clicked(Base sender, MouseButtonState arguments)
void _iconImage_Clicked(Base sender, MouseButtonState arguments)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private void

{
mCooldownLabel.IsHidden = true;
if (spell != null)
var spellTex = Globals.ContentManager?.GetTexture(TextureType.Spell, spell.Icon);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spellIconTexture

mTexLoaded = string.Empty;
if (_descWindow != null)
{
_descWindow.Dispose();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_descriptionWindow?.Dispose();

@pandinocoder pandinocoder merged commit 6c1d3f8 into AscensionGameDev:main Mar 12, 2025
1 check passed
@pandinocoder pandinocoder deleted the spell-window branch March 12, 2025 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants